USE [BMIG_MENSUAL_POST_CADENA]

 -- creating the store procedure
IF EXISTS (SELECT name 
	   FROM   sysobjects 
	   WHERE  name = 'WASP_M0010_ACTUALIZA_FECHA'
	   AND 	  type = 'P') 
	DROP PROCEDURE WASP_M0010_ACTUALIZA_FECHA
GO

CREATE PROCEDURE [dbo].[WASP_M0010_ACTUALIZA_FECHA](@FECHA CHAR(8)) AS
begin 
    update dbo.ing_produccion_temp
    set 
    	PeriodoPro = substring(cast(@FECHA as varchar),1,6),
    	FechaEnvio = @FECHA
END	
